package com.sinosoft.tcmemr.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sinosoft.tcmemr.entity.AdminUserEntity;
import com.sinosoft.tcmemr.manager.AdminUserManager;

@Service
public class AdminUserService {
	@Autowired
	private AdminUserManager adminUserManager;
	
	/**
     * 插入管理用户
     * @param AdminUserEntity
     * @return true or false
     */
    public boolean addAdminUser(AdminUserEntity adminUser){
    	return adminUserManager.insertSelective(adminUser);
    }
    /**
     * 更新管理员用户
     * @param AdminUserEntity
     * @return true or false
     */
    public boolean updateByPrimaryKeySelective(AdminUserEntity adminUser){
    	return adminUserManager.updateByPrimaryKeySelective(adminUser);
    }
    /**
     * 删除用户信息
     * @param id
     * @return 无
     */
    public boolean deleteByPrimaryKey(Integer id){
    	return adminUserManager.deleteByPrimaryKey(id);
    }
    /**
     * 得到管理员用户信息
     * @param id
     * @return AdminUserEntity
     */
    public AdminUserEntity getByPrimaryKey(Integer id){
    	return adminUserManager.getByPrimaryKey(id);
    }
    
    
}
